Validation and Error Reporting

Description

Properties for implementing and styling the validation and error reporting in an application.

Name
Description
Only validate edited fields

Should all fields be validated, or only fields that were edited? This setting only applies to fields that are NOT in a Repeating Section. For fields that are in a Repeating Section, you should set the appropriate options in the Repeating Section properties.

Only validate fields whose values were changed

Should all fields be validated, or only fields whose values were changed from their initial value.

Submit dialog if has client-side validation errors

When the user clicks the submit button, if a client-side validation error has already been detected, should the dialog be submitted anyway? If a client-side validation error has already been found, you might want to prevent the dialog from being submitted to the server (since you already know that there are some errors in the dialog). On the other hand, you might want to still submit so that you can get a full list of all of the errors; by evaluating the server-side validation rules.

Error style

Specify how field validation errors should be displayed. 'Block' displays errors under the field. 'Tip' creates a pop-up error when hovering over the field. 'Inline' displays them next to the field and can only be used if the 'Layout Type' is set to 'ControlWidth'. The 'Global' option displays all errors in a single location. Note that fields in Repeating Sections automatically use the 'tip' error style.

Classname - field with error

The classname of the control that has the error. Leave blank for default class.

Classname - error message

The classname of the element in which the error is displayed. Leave blank for default class.

Classname - field with error when hovering over error message

When you hover over the error message in the global space, or over the control that has the error, this class defines how the control that has the error is styled.

Classname - error message (on hover over error message)

When you hover over the error message in the global space, or over the control that has the error, this class defines how the control that has the error is styled.

Error icon

Sets the icon to be used. Set to '<Specified by Style>' to use the icon in the component style.

Show warning when saving UX if using non-recommended error style

If the 'Layout style' is set to 'ContainerWidth' the error styles of 'icon' and 'inline' are not recommended because they will display the error icon/error text underneath the control, not to the right of the control as you would have expected. It is recommended that you NOT set the error style to 'icon' or 'inline' when using the 'ContainerWidth' mode. If this checkbox is checked, then every time you save this UX component in the UX Builder, you will get a warning telling you that you have selected an error style that is not recommended.

Placeholder for UX Component validation error messages

This property is optional. Specify a placeholder for where global UX component validation errors should be shown. If you don't specify a value, a default location will be used. If your component uses Panels, then it is recommended that you specify a placeholder here; otherwise any error messages will be shown in a pop-up window. If you do not want the error messages to shown in a pop-up window specify <No Alert> as the value for the placeholder.

Show UX Component validation errors in popup-window

If a UX component validation error occurs, specify if the error should be shown in a popup-window. Note that UX component validation errors are distinct from field validation errors. UX component validation errors are defined in the 'DialogValidate' server-side event.

Error messages popup-window title

Specify the title for the popup-window.

Error messages popup-window style

Specify the title for the popup-window.

Show message on UX component if it has field validation errors

If any fields have validation errors, show a message on the dialog to indicate that there were errors. Note that if the component uses Panels, and the message is not shown, you should specify a Javascript function to call and write your own handler. Additionally, the client-side 'onFieldValidationError' event will fire if there are any server-side field level validation errors.

Javascript function to call if any field has validation errors

If any fields have validation errors, specify the name of a Javascript function to call. The function takes a parameter, 'e' which is an array of objects. Each object in the array has a 'control' and 'errorText' property.

Global errors DIV style

Specify the style for the DIV in which global errors are shown. It is sometimes useful to set the width of the DIV in which the global errors are shown.

On many applications there is a need to prevent users from submitting certain types of data, conflicting data, or wrong data into a field. For example, when signing up for a service online it is often necessary to provide a user login. In the case that a login name is already in use, anyone trying to register that same login name will usually get an error message. This is validation and error reporting and it can be carried out on either the client-side or the server-side.

For an overview on how to create validation and error reporting watch this seven part video:

You can also refer to the guides in the properties pages and in the Server Events and Field Properties pages listed below.

See Also